name: pre-commit run_id: commands[0] env HOME: /home/jenkins env LANG: C.UTF-8 env PATH: /w/workspace/docs-tox-verify-vanadium/.tox/pre-commit/bin:/opt/pyenv/bin:/tmp/venv-9dCU/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONHASHSEED: 3768325752 env PYTHONIOENCODING: utf-8 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/docs-tox-verify-vanadium/.tox/pre-commit env TOX_ENV_NAME: pre-commit env TOX_WORK_DIR: /w/workspace/docs-tox-verify-vanadium/.tox env VIRTUAL_ENV: /w/workspace/docs-tox-verify-vanadium/.tox/pre-commit metadata pid: 2295 cwd: /w/workspace/docs-tox-verify-vanadium allow: /w/workspace/docs-tox-verify-vanadium/.tox/pre-commit/bin/* cmd: pre-commit run --all-files --show-diff-on-failure exit_code: 1 [WARNING] hook id `remove-tabs` uses deprecated stage names (commit) which will be removed in a future version. run: `pre-commit migrate-config` to automatically fix this. [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version. Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this. if it does not -- consider reporting an issue to that repo. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint. [INFO] Initializing environment for https://github.com/jorisroovers/gitlint:./gitlint-core[trusted-deps]. [INFO] Initializing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/Lucas-C/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... trim trailing whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 - files were modified by this hook Fixing test-gerrit-local.sh Fixing LOCAL-TESTING-README.md Tabs remover.............................................................Passed pre-commit hook(s) made changes. If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`. To run `pre-commit` as part of git workflow, use `pre-commit install`. All changes made by hooks: diff --git a/LOCAL-TESTING-README.md b/LOCAL-TESTING-README.md index c6acf582b..939ba5c74 100644 --- a/LOCAL-TESTING-README.md +++ b/LOCAL-TESTING-README.md @@ -74,7 +74,7 @@ Usage: test-gerrit-local.sh [options] - Sphinx documentation build (`tox -e docs`) - Link checking (`tox -e docs-linkcheck`) -### Gerrit Integration Flow +### Gerrit Integration Flow 1. **GitHub Actions triggers** on Gerrit events 2. **Full workflow executes** when `env.ACT != 'true'` 3. **Gerrit jobs run**: change info → tox verify → vote @@ -137,7 +137,7 @@ bash test-gerrit-local.sh --gerrit-url "https://git.opendaylight.org/gerrit/c/do - `verify-setup.sh` - Environment validation script - `.pre-commit-config.yaml` - Pre-commit hooks for code quality -### Modified Files +### Modified Files - `.github/workflows/gerrit-verify.yaml` - Enhanced with local testing support - `docs/index.rst` - Test change (can be reverted) diff --git a/test-gerrit-local.sh b/test-gerrit-local.sh index 5807abcd9..b6f60771c 100755 --- a/test-gerrit-local.sh +++ b/test-gerrit-local.sh @@ -76,7 +76,7 @@ if [[ -n "$GERRIT_URL" ]]; then # Extract project from URL (e.g., docs) GERRIT_PROJECT=$(echo "$GERRIT_URL" | sed -n 's|.*/gerrit/c/\([^/]*\)/.*|\1|p') [[ -z "$GERRIT_PROJECT" ]] && GERRIT_PROJECT="docs" - + # Resolve latest patchset if needed if [[ "$PATCHSET_NUMBER" == "latest" ]]; then echo "Fetching latest patchset for change $CHANGE_NUMBER..." >&2